package cn.lngaosu.lwyd.module.integration.dal.mysql.weixinvideolivedata;

import java.util.*;

import cn.lngaosu.lwyd.framework.common.pojo.PageResult;
import cn.lngaosu.lwyd.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.lngaosu.lwyd.framework.mybatis.core.mapper.BaseMapperX;
import cn.lngaosu.lwyd.module.integration.dal.dataobject.weixinvideolivedata.WeixinvideoLivedataDO;
import org.apache.ibatis.annotations.Mapper;
import cn.lngaosu.lwyd.module.integration.controller.admin.weixinvideolivedata.vo.*;

/**
 * 微信视频号直播大屏数据 Mapper
 *
 * @author 张恒
 */
@Mapper
public interface WeixinvideoLivedataMapper extends BaseMapperX<WeixinvideoLivedataDO> {

    default PageResult<WeixinvideoLivedataDO> selectPage(WeixinvideoLivedataPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<WeixinvideoLivedataDO>()
                .betweenIfPresent(WeixinvideoLivedataDO::getCreateTime, reqVO.getCreateTime())
                .eqIfPresent(WeixinvideoLivedataDO::getExportId, reqVO.getExportId())
                .eqIfPresent(WeixinvideoLivedataDO::getTraceId, reqVO.getTraceId())
                .eqIfPresent(WeixinvideoLivedataDO::getNewWatchUv, reqVO.getNewWatchUv())
                .eqIfPresent(WeixinvideoLivedataDO::getMaxOnlineWatchUv, reqVO.getMaxOnlineWatchUv())
                .eqIfPresent(WeixinvideoLivedataDO::getImpressionUv, reqVO.getImpressionUv())
                .eqIfPresent(WeixinvideoLivedataDO::getAverageWatchSecondsPerAudience, reqVO.getAverageWatchSecondsPerAudience())
                .eqIfPresent(WeixinvideoLivedataDO::getNewFollowUv, reqVO.getNewFollowUv())
                .eqIfPresent(WeixinvideoLivedataDO::getNewFansClubUv, reqVO.getNewFansClubUv())
                .eqIfPresent(WeixinvideoLivedataDO::getCommentUv, reqVO.getCommentUv())
                .eqIfPresent(WeixinvideoLivedataDO::getRewardUv, reqVO.getRewardUv())
                .eqIfPresent(WeixinvideoLivedataDO::getSharingUv, reqVO.getSharingUv())
                .eqIfPresent(WeixinvideoLivedataDO::getHotQuota, reqVO.getHotQuota())
                .eqIfPresent(WeixinvideoLivedataDO::getLiveDashboardData, reqVO.getLiveDashboardData())
                .eqIfPresent(WeixinvideoLivedataDO::getLiveComparisonIndex, reqVO.getLiveComparisonIndex())
                .eqIfPresent(WeixinvideoLivedataDO::getLiveEcDataSummary, reqVO.getLiveEcDataSummary())
                .eqIfPresent(WeixinvideoLivedataDO::getLiveEcConversionMetric, reqVO.getLiveEcConversionMetric())
                .eqIfPresent(WeixinvideoLivedataDO::getLiveEcProfile, reqVO.getLiveEcProfile())
                .eqIfPresent(WeixinvideoLivedataDO::getLiveDistributionChannel, reqVO.getLiveDistributionChannel())
                .eqIfPresent(WeixinvideoLivedataDO::getSingleLiveEcSpuDataPageV2, reqVO.getSingleLiveEcSpuDataPageV2())
                .eqIfPresent(WeixinvideoLivedataDO::getLiveDuration, reqVO.getLiveDuration())
                .betweenIfPresent(WeixinvideoLivedataDO::getStartTime, reqVO.getStartTime())
                .orderByDesc(WeixinvideoLivedataDO::getId));
    }

}